from flask import Blueprint, jsonify

from utils.work_db import get_session

api = Blueprint('base_api', __name__, url_prefix='/api/v1/base')


@api.route('/beat', methods=['GET', 'HEAD'])
def beat():
    session = get_session()
    session.execute('select 1')
    return jsonify({'code': 0})
